package com.roncoo.order.controller;


import com.roncoo.order.entity.UserCourse;
import com.roncoo.order.service.IUserCourseService;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;

import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

/**
 * <p>
 *  前端控制器
 * </p>
 *
 * @author jl
 * @since 2021-04-10
 */
@RestController
@RequestMapping("/user-course")
public class UserCourseController {

    @Resource
    private IUserCourseService userCourseService;

    /**
     * 查询用户是否购买课程
     */
    @GetMapping("getOne")
    public Boolean getOneUser(Integer id,Integer cid){
        /*System.out.println(id+"=="+cid);*/
        boolean b=userCourseService.getOneUser(id,cid);
        return b;
    }
}

